//
// Created by Administrator on 25-6-27.
//

#ifndef SE_HW_H
#define SE_HW_H
#include "main.h"
#define SEON 1
#define SEOFF 0
#define SEOBJ struct SE
#define SERPWM(ARR, R) ((uint32_t)((((float)R/180.0 * 2000 + 500)/20000.0 * ARR)))
struct SE {
    TIM_TypeDef * TIMx;
    TIM_HandleTypeDef *HTIMx;
    uint32_t TIMCHx;
    uint32_t Fclk;
};

void SE_Init(SEOBJ* se);
void SE_SetStatus(SEOBJ *se, uint8_t status);
void SE_Rotate(SEOBJ *se, uint8_t r);
#endif //SE_HW_H
